<style>
#newMeetingTicket{
	width:500px;
}
#newMeetingTicket label{
	width:80px;
}
#newMeetingTicket select{
	width:150px;
}
#newMeetingTicket textarea{
	width:250px;
}
#newMeetingTicket input[type=submit]{
	background-image:url(gui/icons/save.gif);
	background-position:3px center;
	background-repeat:no-repeat;
	padding-left:18px;
	float:right;
	clear:both;
}
#newMeetingTicket input#mt_date{
	width:60px;
}
</style>
<form id="newMeetingTicket" action="javascript:void(0);" onsubmit="submitForm(this,'rokovnik.php','POST','afterSaveTicket',1)" class="area">
	
	<input type="hidden" name="a" value="adminMeetings" />
	<input type="hidden" name="mod" value="saveTicket" />
    <input type="hidden" name="ticketid" value="{{$ticketid}}" />
	
	<h2>{{$naslov}}</h2>
	
	<label class="left" for="searchKomitent">Komitent:</label>
	<input type="text" disabled="disabled" name="mt_komitent" id="mt_komitent" value="{{$komitent}}" />
	<input type="hidden" name="mt_komitent_id" id="mt_komitent_id" value="{{$komitent_id}}" />
	
	<br clear="all" />
	<label class="left" for="mt_adresa">Adresa:</label>
	<select name="mt_adresa" id="mt_adresa" onchange="if(parseInt(this.value)<1){this.nextSibling.nextSibling.style.display='block'}else{this.nextSibling.nextSibling.style.display='none'}">
		<option value="-1">---</option>
		{{%loop start adresa_id}}
		<option value="{{$adresa}}" {{$adresa_selected}}>{{$adresa}}</option>
		{{%loop end}}
	</select>
	<input type="text" name="adresa_other" id="adresa_other" value="{{$adresa_other}}" />
	
	<br clear="all" />
	<label class="left" for="mt_komdels">Delatnosti:</label>
	<textarea name="mt_komdels" id="mt_komdels">{{$komdels}}</textarea>
	
	<br clear="all" />
	<label class="left" for="mt_kontakt">Kontakt:</label>
	<select name="mt_kontakt" id="mt_kontakt" onchange="var kn=this.nextSibling.nextSibling; var kf=document.getElementById('mt_kontakt_funkcija'); if(parseInt(this.value)<1){kn.style.display='block'; kf.value='';}else{kn.style.display='none';kf.value=this.value.substr(this.value.indexOf('{!}')+3)}">
		<option value="-1">---</option>
		{{%loop start kontakt}}
		<option value="{{$kontakt}}{!}{{$kontakt_func}}" {{$kontakt_selected}}>{{$kontakt}}</option>
		{{%loop end}}
	</select>
	<input type="text" name="mt_kontakt_other" id="mt_kontakt_other" value="{{$kontakt_other}}" />
	
	<br clear="all" />
	<label for="mt_kontakt_funkcija" class="left">Funkcija:</label>
	<input type="text" name="mt_kontakt_funkcija" id="mt_kontakt_funkcija" value="{{$kontakt_fja}}" />
	
	<label class="left" for="mt_poreklo">Poreklo:</label>
	<select name="mt_poreklo" id="mt_poreklo">
		{{%loop start poreklo_id}}
		<option value="{{$poreklo_id}}" {{$poreklo_selected}}>{{$poreklo_name}}</option>
		{{%loop end}}
	</select>
	
	<br clear="all" />
	<label class="left" for="mt_telefon">Telefon:</label>
	<select name="mt_telefon" id="mt_telefon" onchange="if(parseInt(this.value)<1){this.nextSibling.nextSibling.style.display='block'}else{this.nextSibling.nextSibling.style.display='none'}">
		<option value="-1">---</option>
		{{%loop start telefon}}
		<option value="{{$telefon}}" {{$telefon_selected}}>{{$telefon}}</option>
		{{%loop end}}
	</select>
	<input type="text" name="telefon_other" id="telefon_other" value="{{$telefon_other}}" />
	
	<br clear="all" />
	<label for="mt_date" class="left">Datum:</label>
	<input type="text" name="mt_date" id="mt_date" value="{{$mt_date}}" />
	<input type="button" class="datePicker" onclick="displayDatePicker('mt_date',this)" />
	
	<label for="mt_hour" class="left" style="width:25px;">Sat:</label>
	<input type="text" maxlength="2" name="mt_hour" id="mt_hour" style="width:16px;" maxval="23" minval="0" value="{{$mt_hour}}" onchange="fixNumStepVal(this);" />
	<img src="gui/numstep.gif" border="0" usemap="#MapMT1" class="numstep" />
	<label for="mt_minute" class="left" style="width:auto;">Min:</label>
	<input type="text" maxlength="2" name="mt_minute" id="mt_minute" style="width:16px;" maxval="59" minval="0" value="{{$mt_minute}}" onchange="fixNumStepVal(this)" />
	<img src="gui/numstep.gif" border="0" usemap="#MapMT2" class="numstep" />
	<map name="MapMT1" id="MapMT1">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('mt_hour')" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('mt_hour')" />
	</map>
	<map name="MapMT2" id="MapMT2">
		<area shape="rect" coords="0,0,7,5" href="javascript:void(0)" onclick="incrementNumStep('mt_minute')" />
		<area shape="rect" coords="0,5,7,10" href="javascript:void(0)" onclick="decrementNumStep('mt_minute')" />
	</map>
	
	<br clear="all" />
	<label class="left" for="mt_komercijalista">Komercijalista:</label>
    <input type="hidden" name="mt_komer_prev" value="{{$komer_prev}}" />
	<select name="mt_komercijalista" id="mt_komercijalista">
		<option value="-1">---</option>
		{{%loop start radid}}
		<option value="{{$radid}}" {{$radnik_selected}}>{{$radnik_ime}}&nbsp;{{$radnik_prezime}}</option>
		{{%loop end}}
	</select>
    {{$comment_start_lozinka_manager}}
    <br clear="all" />
    <input type="hidden" name="mt_manager_prev" value="{{$manager_prev}}" />
    <label class="left" for="mt_manager">Menadžer:</label>
    <select name="mt_manager" id="mt_manager">
		<option value="-1">---</option>
		{{%loop start manid}}
		<option value="{{$manid}}" {{$manager_selected}}>{{$manager_ime}}&nbsp;{{$manager_prezime}}</option>
		{{%loop end}}
	</select>
    <label class="left" style="width:auto" for="mt_lozinka_manager">Lozinka:</label><input type="password" name="mt_lozinka_manager" id="mt_lozinka_manager" />
    {{$comment_end_lozinka_manager}}
	
	<br clear="all" />
	<label for="mt_napomena" class="left">Napomena:</label>
	<textarea name="mt_napomena" id="mt_napomena">{{$napomena}}</textarea>
	
	<input type="submit" value="sačuvaj" />
</form>